﻿using System;
using System.Collections.Generic;
using System.Linq;
using Microsoft.Xna.Framework;
using Microsoft.Xna.Framework.Audio;
using Microsoft.Xna.Framework.Content;
using Microsoft.Xna.Framework.GamerServices;
using Microsoft.Xna.Framework.Graphics;
using Microsoft.Xna.Framework.Input;
using Microsoft.Xna.Framework.Media;
using Microsoft.Xna.Framework.Net;
using Microsoft.Xna.Framework.Storage;
using PSBLib1;

namespace PSB
{
    class Unit
    {
        public Vector3 Position, TargetPosition;
        public List<Vector3> Waypoints;
        public Structure SpawnBuilding;

        public string Name;
        public string UnitType;
        public string Faction;
        public string TextureName;
        public string Orders;
        public string Color;
        public string Direction;

        public int IDNumber;
        public int BigWidth, BigHeight;
        public int SmallWidth, SmallHeight;
        public int CurrentHealth, MaxHealth;
        public int MeleeDamage, RangedDamage;
        public int Defense;
        public int Speed, AttackRate;
        public int VisionRadius, AttackRadius;
        public int Cost;

        public bool Moving, Alive;
        public bool Selected, ReachedPosition;

        public Unit()
        {
            // Trivial constructor
        }

        public Unit(string name)
        {
            // Non-trivial constructor
        }

        public void LoadData()
        {
            // Load in the data for the unit from an xml
        }

        public List<Vector3> GenerateWaypoints(Vector3 targetposition)
        {
            // Crazy path finding algorithm goes here
            List<Vector3> waypoints = new List<Vector3>();
            return waypoints;
        }

    }
}
